<template>
  <div id="app">
    <!-- 导航 -->
    <el-menu theme="dark" :default-active="activeIndex" mode="horizontal" @select="handleSelect">
      <li class="title">
        <h2>Console</h2>
      </li>
      <el-menu-item index="1">
        <router-link to="/">
          DashBoard
        </router-link>
      </el-menu-item>
      <el-submenu index="2">
        <template slot="title">Rules</template>
        <el-menu-item index="2-1">
          <router-link to="/rules/calculatorRules">
            CalculatorRules
          </router-link>
        </el-menu-item>
        <el-menu-item index="2-2">RateRules</el-menu-item>
      </el-submenu>
      <el-menu-item index="3">TestCase</el-menu-item>
      <el-menu-item index="4">Report</el-menu-item>
    </el-menu>
    <!-- 视点 -->
    <router-view></router-view>
  </div>
</template>

<script>
  export default {
    name: 'app',
    data() {
      return {
        activeIndex: '1',
        activeIndex2: '1'
      };
    },
    methods: {
      handleSelect(key, keyPath) {
          //
      }
    }
  }
</script>
